/*
 * CC3Mesh.h
 *
 * cocos3d 0.6.1
 * Author: Bill Hollings
 * Copyright (c) 2010-2011 The Brenwill Workshop Ltd. All rights reserved.
 * http://www.brenwill.com
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * http://en.wikipedia.org/wiki/MIT_License
 */

/** @file */	// Doxygen marker
#ifndef __CC3METH_H__
#define __CC3METH_H__

#include "CC3Node.h"
#include "CC3Material.h"

/**
 * A CC3Mesh holds the 3D mesh for a CC3MeshNode. The CC3MeshNode enapsulates a reference
 * to the CC3Mesh.
 *
 * In 3D models, the mesh generally remains fixed, and transformations such as translation,
 * rotation, and scaling are applied at the node level. A single CC3Mesh instance, which
 * typically contains a large set of data points, can be used by many nodes simultaneously,
 * and each node instance can be transformed, colored, and textured independently.
 *
 * With this in mind, and following best practices to consevere memory and processing time,
 * you should strive to create only one CC3Mesh instance for each distinct mesh in your
 * application, and assign that single CC3Mesh instance to any number of separate
 * CC3MeshNode instances that make use of it.
 *
 * When drawing the mesh to the GL engine, this class remembers which mesh was last drawn
 * and only binds the mesh data to the GL engine when a different mesh is drawn. This allows
 * the application to organize the CC3MeshNodes within the CC3World so that nodes using the
 * same mesh are drawn together, before moving on to other mesh models. This strategy
 * can minimize the number of mesh switches in the GL engine, which improves performance. 
 *
 * CC3Mesh is an abstract class. Subclasses can be created for loading and managing
 * meshes from different sources and third-party libraries.
 */

class CC3Mesh : public CC3Identifiable 
{
public:
	CC3Mesh();
	~CC3Mesh();
	
	virtual bool getHasNormals();
	
	virtual bool getHasColors();
	
	virtual CC3BoundingBox getBoundingBox();
	
	#pragma mark Allocation and initialization
	
	static CC3Mesh* mesh();
	
	static CC3Mesh* meshWithTag(GLuint aTag);
	
	static CC3Mesh* meshWithName(const char* aName);
	
	static CC3Mesh* meshWithTag(GLuint aTag, const char* aName);
	
	virtual void createGLBuffers();
	
	virtual void deleteGLBuffers();
	
	virtual void releaseRedundantData();
	
	virtual void retainVertexLocations();
	
	virtual void retainVertexNormals();
	
	virtual void retainVertexColors();
	
	virtual void retainVertexTextureCoordinates();
	
	virtual void retainVertexIndices();
	
	virtual void doNotBufferVertexLocations();
	
	virtual void doNotBufferVertexNormals();
	
	virtual void doNotBufferVertexColors();
	
	virtual void doNotBufferVertexTextureCoordinates();
	
	virtual void doNotBufferVertexIndices();
	
	virtual void alignWithTexturesIn(CC3Material* aMaterial);
	
	virtual void alignWithInvertedTexturesIn(CC3Material* aMaterial);
	
	CC_PROPERTY(cocos2d::CCRect, textureRectangle, TextureRectangle); 
	
	virtual cocos2d::CCRect textureRectangleForTextureUnit(GLuint texUnit);
	
	virtual void setTextureRectangle(cocos2d::CCRect aRect, GLuint texUnit);
	
	#pragma mark Drawing
	
	virtual void drawWithVisitor(CC3NodeDrawingVisitor* visitor);
	
	virtual CC3NodeBoundingVolume* getDefaultBoundingVolume();
	
	#pragma mark Accessing vertex data
	
	virtual CC3Vector vertexLocationAt(GLsizei index);
	
	virtual void setVertexLocation(CC3Vector aLocation, GLsizei index);
	
	virtual CC3Vector vertexNormalAt(GLsizei index);
	
	virtual void setVertexNormal(CC3Vector aNormal, GLsizei index);

	virtual cocos2d::ccColor4F vertexColor4FAt(GLsizei index);
	
	virtual void setVertexColor4F(cocos2d::ccColor4F aColor, GLsizei index);
	
	virtual cocos2d::ccColor4B vertexColor4BAt(GLsizei index);
	
	virtual void setVertexColor4B(cocos2d::ccColor4B aColor, GLsizei index);
	
	virtual cocos2d::ccTex2F vertexTexCoord2FAt(GLsizei index, GLuint texUnit);
	
	virtual void setVertexTexCoord2F(cocos2d::ccTex2F aTex2F, GLsizei index, GLuint texUnit);
	
	virtual cocos2d::ccTex2F vertexTexCoord2FAt(GLsizei index);
	
	virtual void setVertexTexCoord2F(cocos2d::ccTex2F aTex2F, GLsizei index);
	
	virtual GLushort vertexIndexAt(GLsizei index);
	
	virtual void setVertexIndex(GLushort vertexIndex, GLsizei index);
	
	#pragma mark Mesh context switching
	
	static void resetSwitching();
	
protected:
	virtual bool getSwitchingMesh();
	
	virtual void bindGLWithVisitor(CC3NodeDrawingVisitor* visitor);
	
	virtual void drawVerticesWithVisitor(CC3NodeDrawingVisitor* visitor);
};

//@interface CC3Mesh : CC3Identifiable
//
///**
// * Indicates whether this mesh contains data for vertex normals.
// * 
// * This abstract implementation always returns NO.
// * Subclasses will override to return an appropriate value.
// */
//@property(nonatomic, readonly) BOOL hasNormals;
//
///**
// * Indicates whether this mesh contains data for vertex colors.
// * 
// * This abstract implementation always returns NO.
// * Subclasses will override to return an appropriate value.
// */
//@property(nonatomic, readonly) BOOL hasColors;
//
///**
// * The axially-aligned-bounding-box (AABB) in the mesh local (untransformed) coordinate system.
// * 
// * This abstract implementation always returns the null bounding box.
// * Subclasses will override to return an appropriate value.
// */
//@property(nonatomic, readonly) CC3BoundingBox boundingBox;
//
//
//#pragma mark Allocation and initialization
//
///**
// * Allocates and initializes an autoreleased unnamed instance with an automatically
// * generated unique tag value. The tag value is generated using a call to nextTag.
// */
//+(id) mesh;
//
///** Allocates and initializes an unnamed autoreleased instance with the specified tag. */
//+(id) meshWithTag: (GLuint) aTag;
//
///**
// * Allocates and initializes an autoreleased instance with the specified name and an
// * automatically generated unique tag value. The tag value is generated using a call to nextTag.
// */
//+(id) meshWithName: (NSString*) aName;
//
///** Allocates and initializes an autoreleased instance with the specified tag and name. */
//+(id) meshWithTag: (GLuint) aTag withName: (NSString*) aName;
//
///**
// * Convenience method to create GL buffers for all vertex arrays used by this mesh.
// *
// * This method may safely be called more than once, or on more than one mesh that shares
// * vertex arrays, since vertex array GL buffers are only created if they don't already exist.
// */
//-(void) createGLBuffers;
//
///**
// * Convenience method to delete any GL buffers for all vertex arrays used by this mesh.
// * The arrays may continue to be used, and the arrays will be passed from the client during
// * each draw instead of bound to the GL server as a vertex buffer.
// *
// * This is a convenience method. Because vertex arrays may be shared between arrays, this
// * method should likely be used when it is known that this mesh is the only user of the array,
// * or to clear GL memory for any rarely used meshes. A more general design is to simply release
// * the vertex array. The GL buffer will be deleted when the vertex array is deallocated.
// *
// * This method may safely be called more than once, or on more than one mesh that shares
// * vertex arrays, since vertex array GL buffers are only deleted if they exist.
// */
//-(void) deleteGLBuffers;
//
///**
// * Once the elements data has been buffered into a GL vertex buffer object (VBO)
// * within the GL engine, via the createGLBuffer method, this method can be used
// * to release the data in main memory that is now redundant.
// *
// * Typically, this method is not invoked directly by the application. Instead, 
// * consider using the same method on a node assembly in order to release as much
// * memory as possible in one simply method invocation.
// */
//-(void) releaseRedundantData;
//
///**
// * Convenience method to cause the vertex location data to be retained in application
// * memory when releaseRedundantData is invoked, even if it has been buffered to a GL VBO.
// *
// * Only the vertex locations will be retained. Any other vertex data, such as normals,
// * or texture coordinates, that has been buffered to GL VBO's, will be released from
// * application memory when releaseRedundantData is invoked.
// */
//-(void) retainVertexLocations;
//
///**
// * Convenience method to cause the vertex normal data to be retained in application
// * memory when releaseRedundantData is invoked, even if it has been buffered to a GL VBO.
// *
// * Only the vertex normals will be retained. Any other vertex data, such as locations,
// * or texture coordinates, that has been buffered to GL VBO's, will be released from
// * application memory when releaseRedundantData is invoked.
// */
//-(void) retainVertexNormals;
//
///**
// * Convenience method to cause the vertex color data to be retained in application
// * memory when releaseRedundantData is invoked, even if it has been buffered to a GL VBO.
// *
// * Only the vertex colors will be retained. Any other vertex data, such as locations,
// * or texture coordinates, that has been buffered to GL VBO's, will be released from
// * application memory when releaseRedundantData is invoked.
// */
//-(void) retainVertexColors;
//
///**
// * Convenience method to cause the vertex texture coordinate data for all texture units
// * used by this mesh to be retained in application memory when releaseRedundantData is
// * invoked, even if it has been buffered to a GL VBO.
// *
// * Only the vertex texture coordinates will be retained. Any other vertex data, such as
// * locations, or normals, that has been buffered to GL VBO's, will be released from
// * application memory when releaseRedundantData is invoked.
// */
//-(void) retainVertexTextureCoordinates;
//
///**
// * Convenience method to cause the vertex index data to be retained in application
// * memory when releaseRedundantData is invoked, even if it has been buffered to a GL VBO.
// *
// * Only the vertex indices will be retained. Any other vertex data, such as locations,
// * or texture coordinates, that has been buffered to GL VBO's, will be released from
// * application memory when releaseRedundantData is invoked.
// */
//-(void) retainVertexIndices;
//
///**
// * Convenience method to cause the vertex location data to be skipped when
// * createGLBuffers is invoked. The vertex data is not buffered to a a GL VBO,
// * is retained in application memory, and is submitted to the GL engine on
// * each frame render.
// *
// * Only the vertex locations will not be buffered to a GL VBO. Any other vertex
// * data, such as normals, or texture coordinates, will be buffered to a GL VBO
// * when createGLBuffers is invoked.
// *
// * This method causes the vertex data to be retained in application memory,
// * so, if you have invoked this method, you do NOT also need to invoke the
// * retainVertexLocations method.
// */
//-(void) doNotBufferVertexLocations;
//
///**
// * Convenience method to cause the vertex normal data to be skipped when
// * createGLBuffers is invoked. The vertex data is not buffered to a a GL VBO,
// * is retained in application memory, and is submitted to the GL engine on
// * each frame render.
// *
// * Only the vertex normals will not be buffered to a GL VBO. Any other vertex
// * data, such as locations, or texture coordinates, will be buffered to a GL
// * VBO when createGLBuffers is invoked.
// *
// * This method causes the vertex data to be retained in application memory,
// * so, if you have invoked this method, you do NOT also need to invoke the
// * retainVertexNormals method.
// */
//-(void) doNotBufferVertexNormals;
//
///**
// * Convenience method to cause the vertex color data to be skipped when
// * createGLBuffers is invoked. The vertex data is not buffered to a a GL VBO,
// * is retained in application memory, and is submitted to the GL engine on
// * each frame render.
// *
// * Only the vertex colors will not be buffered to a GL VBO. Any other vertex
// * data, such as locations, or texture coordinates, will be buffered to a GL
// * VBO when createGLBuffers is invoked.
// *
// * This method causes the vertex data to be retained in application memory,
// * so, if you have invoked this method, you do NOT also need to invoke the
// * retainVertexColors method.
// */
//-(void) doNotBufferVertexColors;
//
///**
// * Convenience method to cause the vertex texture coordinate data for all
// * texture units used by this mesh to be skipped when createGLBuffers is
// * invoked. The vertex data is not buffered to a a GL VBO, is retained in
// * application memory, and is submitted to the GL engine on each frame render.
// *
// * Only the vertex texture coordinates will not be buffered to a GL VBO.
// * Any other vertex data, such as locations, or texture coordinates, will
// * be buffered to a GL VBO when createGLBuffers is invoked.
// *
// * This method causes the vertex data to be retained in application memory,
// * so, if you have invoked this method, you do NOT also need to invoke the
// * retainVertexTextureCoordinates method.
// */
//-(void) doNotBufferVertexTextureCoordinates;
//
///**
// * Convenience method to cause the vertex index data to be skipped when
// * createGLBuffers is invoked. The vertex data is not buffered to a a GL VBO,
// * is retained in application memory, and is submitted to the GL engine on
// * each frame render.
// *
// * Only the vertex indices will not be buffered to a GL VBO. Any other vertex
// * data, such as locations, or texture coordinates, will be buffered to a GL
// * VBO when createGLBuffers is invoked.
// *
// * This method causes the vertex data to be retained in application memory,
// * so, if you have invoked this method, you do NOT also need to invoke the
// * retainVertexColors method.
// */
//-(void) doNotBufferVertexIndices;
//
///**
// * Aligns the texture coordinates of the mesh with the textures held in the specified material.
// *
// * This method can be useful when the mesh is covered by textures whose width and height
// * are not a power-of-two. Under iOS, when loading a texture that is not a power-of-two,
// * the texture will be converted to a size whose width and height are a power-of-two.
// * The result is a texture that can have empty space on the top and right sides. If the
// * texture coordinates of the mesh do not take this into consideration, the result will
// * be that only the lower left of the mesh will be covered by the texture.
// *
// * When this occurs, invoking this method will adjust the texture coordinates of the mesh
// * to map to the original width and height of the texture.
// *
// * If the mesh is using multi-texturing, this method will adjust the texture coordinates
// * array for each texture unit, using the corresponding texture for that texture unit
// * in the specified material.
// *
// * Care should be taken when using this method, as it changes the actual vertex data.
// * This method should only be invoked once on any mesh, and it may cause mapping conflicts
// * if the same mesh is shared by other CC3MeshNodes that use different textures.
// *
// * To adjust the texture coordinates of only a single texture coordinates array within
// * this mesh, invoke the alignWithTexture: method on the appropriate instance of
// * CC3VertexTextureCoordinates.
// */
//-(void) alignWithTexturesIn: (CC3Material*) aMaterial;
//
///**
// * Aligns the texture coordinates of the mesh with the textures held in the specified material.
// *
// * The texture coordinates are aligned assuming that the texture is inverted in the
// * Y-direction. Certain texture formats are inverted during loading, and this method
// * can be used to compensate.
// *
// * This method can be useful when the mesh is covered by textures whose width and height
// * are not a power-of-two. Under iOS, when loading a texture that is not a power-of-two,
// * the texture will be converted to a size whose width and height are a power-of-two.
// * The result is a texture that can have empty space on the top and right sides. If the
// * texture coordinates of the mesh do not take this into consideration, the result will
// * be that only the lower left of the mesh will be covered by the texture.
// *
// * When this occurs, invoking this method will adjust the texture coordinates of the mesh
// * to map to the original width and height of the texture.
// *
// * If the mesh is using multi-texturing, this method will adjust the texture coordinates
// * array for each texture unit, using the corresponding texture for that texture unit
// * in the specified material.
// *
// * Care should be taken when using this method, as it changes the actual vertex data.
// * This method should only be invoked once on any mesh, and it may cause mapping conflicts
// * if the same mesh is shared by other CC3MeshNodes that use different textures.
// *
// * To adjust the texture coordinates of only a single texture coordinates array within
// * this mesh, invoke the alignWithInvertedTexture: method on the appropriate instance
// * of CC3VertexTextureCoordinates.
// */
//-(void) alignWithInvertedTexturesIn: (CC3Material*) aMaterial;
//
///**
// * Defines the rectangular area of the textures, for all texture units, that should
// * be mapped to this mesh.
// *
// * This property facilitates the use of sprite-sheets, where the mesh is covered
// * by a small fraction of a larger texture. This technique has many uses, including
// * animating a texture onto a mesh, where each section of the full texture is really
// * a different frame of a texture animation, or simply loading one larger texture
// * and using parts of it to texture many different meshes.
// *
// * The dimensions of this rectangle are taken as fractional portions of the full
// * area of the texture. Therefore, a rectangle with zero origin, and unit size
// * ((0.0, 0.0), (1.0, 1.0)) indicates that the mesh should be covered with the
// * complete texture.
// * 
// * A rectangle of smaller size, and/or a non-zero origin, indicates that the mesh
// * should be covered by a fractional area of the texture. For example, a rectangular
// * value for this property with origin at (0.5, 0.5), and size of (0.5, 0.5) indicates
// * that only the top-right quarter of the texture will be used to cover this mesh.
// *
// * The bounds of the texture rectangle must fit within a unit rectangle. Both the
// * bottom-left and top-right corners must lie between zero and one in both the
// * X and Y directions.
// *
// * The dimensions of the rectangle in this property are independent of adjustments
// * made by the  alignWithTexturesIn: and alignWithInvertedTexturesIn: methods.
// * A unit rectangle value for this property will automatically take into
// * consideration the adjustment made to the mesh by those methods, and will display
// * only the part of the texture defined by them. Rectangular values for this property
// * that are smaller than the unit rectangle will be relative to the displayable area
// * defined by alignWithTexturesIn: and alignWithInvertedTexturesIn:.
// *
// * As an example, if the alignWithTexturesIn: method was used to limit the mesh
// * to using only 80% of the texture (perhaps when using a non-POT texture), and this
// * property was set to a rectangle with origin at (0.5, 0.0) and size (0.5, 0.5),
// * the mesh will be covered by the bottom-right quarter of the usable 80% of the
// * overall texture.
// *
// * This property affects all texture units used by this mesh, to query or change
// * this property for a single texture unit only, use the textureRectangleForTextureUnit:
// * and setTextureRectangle:forTextureUnit: methods.
// *
// * The initial value of this property is a rectangle with origin at zero, and unit
// * size, indicating that the mesh will be covered with the complete usable area of
// * the texture.
// */
//@property(nonatomic, assign) CGRect textureRectangle;
//
///**
// * Returns the textureRectangle property from the texture coordinates that are
// * mapping the specified texture unit index.
// *
// * See the notes for the textureRectangle property of this class for an explanation
// * of the use of this property.
// */
//-(CGRect) textureRectangleForTextureUnit: (GLuint) texUnit;
//
///**
// * Sets the textureRectangle property from the texture coordinates that are
// * mapping the specified texture unit index.
// *
// * See the notes for the textureRectangle property of this class for an explanation
// * of the use of this property.
// */
//-(void) setTextureRectangle: (CGRect) aRect forTextureUnit: (GLuint) texUnit;
//
//
//#pragma mark Drawing
//
///**
// * Draws the mesh data to the GL engine. The specified visitor encapsulates
// * the frustum of the currently active camera, and certain drawing options.
// *
// * If this mesh is different than the last mesh drawn, this method binds this
// * mesh data to the GL engine. Otherwise, if this mesh is the same as the mesh
// * already bound, it is not bound again, Once binding is complete, this method then performs
// * the GL draw operations.
// * 
// * This is invoked automatically from the draw method of the CC3MeshNode instance that is
// * using this mesh. Usually, the application never needs to invoke this method directly.
// */
//-(void) drawWithVisitor: (CC3NodeDrawingVisitor*) visitor;
//
///**
// * Returns an allocated, initialized, autorelease instance of the bounding volume to
// * be used by the CC3MeshNode that wraps this mesh. This method is called automatically
// * by the CC3MeshNode instance when this mesh is attached to the CC3MeshNode.
// *
// * This abstract implementation always returns nil. Subclasses will override to provide
// * an appropriate and useful bounding volume instance.
// */
//-(CC3NodeBoundingVolume*) defaultBoundingVolume;
//
//
//#pragma mark Accessing vertex data
//
//
///**
// * Returns the location element at the specified index from the vertex data.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(CC3Vector) vertexLocationAt: (GLsizei) index;
//
///**
// * Sets the location element at the specified index in the vertex data to the specified value.
// * 
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(void) setVertexLocation: (CC3Vector) aLocation at: (GLsizei) index;
//
///**
// * Returns the normal element at the specified index from the vertex data.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(CC3Vector) vertexNormalAt: (GLsizei) index;
//
///**
// * Sets the normal element at the specified index in the vertex data to the specified value.
// * 
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(void) setVertexNormal: (CC3Vector) aNormal at: (GLsizei) index;
//
///**
// * Returns the color element at the specified index from the vertex data.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(ccColor4F) vertexColor4FAt: (GLsizei) index;
//
///**
// * Sets the color element at the specified index in the vertex data to the specified value.
// * 
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(void) setVertexColor4F: (ccColor4F) aColor at: (GLsizei) index;
//
///**
// * Returns the color element at the specified index from the vertex data.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(ccColor4B) vertexColor4BAt: (GLsizei) index;
//
///**
// * Sets the color element at the specified index in the vertex data to the specified value.
// * 
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(void) setVertexColor4B: (ccColor4B) aColor at: (GLsizei) index;
//
///**
// * Returns the texture coordinate element at the specified index from the vertex data
// * at the specified texture unit index.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(ccTex2F) vertexTexCoord2FAt: (GLsizei) index forTextureUnit: (GLuint) texUnit;
//
///**
// * Sets the texture coordinate element at the specified index in the vertex data,
// * at the specified texture unit index, to the specified texture coordinate value.
// * 
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(void) setVertexTexCoord2F: (ccTex2F) aTex2F at: (GLsizei) index forTextureUnit: (GLuint) texUnit;
//
///**
// * Returns the texture coordinate element at the specified index from the vertex data
// * at the commonly used texture unit zero.
// *
// * This is a convenience method that delegates to the vertexTexCoord2FAt:forTextureUnit:
// * method, passing in zero for the texture unit index.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(ccTex2F) vertexTexCoord2FAt: (GLsizei) index;
//
///**
// * Sets the texture coordinate element at the specified index in the vertex data,
// * at the commonly used texture unit zero, to the specified texture coordinate value.
// *
// * This is a convenience method that delegates to the setVertexTexCoord2F:at:forTextureUnit:
// * method, passing in zero for the texture unit index.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(void) setVertexTexCoord2F: (ccTex2F) aTex2F at: (GLsizei) index;
//
///**
// * Returns the index element at the specified index from the vertex data.
// *
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(GLushort) vertexIndexAt: (GLsizei) index;
//
///**
// * Sets the index element at the specified index in the vertex data to the specified value.
// * 
// * The index refers to elements, not bytes. The implementation takes into consideration
// * the elementStride and elementOffset properties to access the correct element.
// *
// * If the releaseRedundantData method has been invoked and the underlying
// * vertex data has been released, this method will raise an assertion exception.
// */
//-(void) setVertexIndex: (GLushort) vertexIndex at: (GLsizei) index;
//
//
//#pragma mark Mesh context switching
//
///**
// * Resets the tracking of the mesh switching functionality.
// *
// * This is invoked automatically by the CC3World at the beginning of each frame drawing cycle.
// * Usually, the application never needs to invoke this method directly.
// */
//+(void) resetSwitching;
//
//@end


#pragma mark -
#pragma mark Deprecated CC3MeshModel

class CC3MeshModel : public CC3Mesh 
{
	
};

/** Deprecated CC3MeshModel renamed to CC3Mesh. @deprecated */
//@interface CC3MeshModel : CC3Mesh
//@end

#endif //__CC3METH_H__

